package com.xm.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.sql.Date;
import java.util.List;

/**
 * 商品实体类
 * @author 康文程
 * @date 2023-12-26 下午 03:40
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
public class Commodity {
    /**
     * 编号
     */
    private Integer commodityId;
    /**
     * 商品名称
     */
    private String commodityName;
    /**
     * 商品折扣
     */
    private Integer commodityDiscount;
    /**
     * 商品图片
     */
    private String commodityImages;
    /**
     * 商品关键字
     */
    private String keywords;
    /**
     * 商品状态
     */
    private Integer commodityState;
    /**
     * 商品说明
     */
    private String commodityDescription;
    /**
     * 赠品 外键
     */
    private Integer commodityGifts;
    /**
     * 上架时间
     */
    private Date shelfTime;
    /**
     * 商品价格
     */
    private BigDecimal commodityPrice;
    /**
     * 商品小类别
     */
    private Integer commodityClass;
    /**
     * 商品库存表
     */
    private CommodityWarehouse commodityWarehouse;
    /**
     * 商品评论表
     */
    private CommodityComment commodityComment;
    /**
     * 商品服务
     */
    private CommodityServe commodityServe;
    /**
     * 商品种类
     */
    private Class type;
    /**
     * 商品大类别
     */
    private Category category;
    /**
     * 商品规格
     */
    private List<CommoditySpecification> commoditySpecification;
    /**
     * 商品保险
     */
    private List<CommodityInsurance> commodityInsurances;
    /**
     * 商品保险类别
     */
    private List<CommodityInsuranceType> commodityInsuranceTypeList;
    /**
     * 赠品
     */
    private CommodityGifts gifts;
    /**
     * 商品详情
     */
    private CommodityDetails commodityDetails;
    /**
     * 商品规格类别
     */
    private List<CommoditySpecificationType> commoditySpecificationTypeList;
    /**
     * 商品参数
     */
    private List<CommodityParameter> commodityParameterList;
    /**
     * 小计
     */
    private BigDecimal subtotal;

    public Commodity(Integer commodityId, String commodityName, String commodityImages, Integer commodityState, BigDecimal commodityPrice,CommodityServe commodityServe) {
        this.commodityId = commodityId;
        this.commodityName = commodityName;
        this.commodityImages = commodityImages;
        this.commodityState = commodityState;
        this.commodityPrice = commodityPrice;
        this.commodityServe = commodityServe;
    }
    public Commodity(Integer commodityId, String commodityName, String commodityImages, Integer commodityState, BigDecimal commodityPrice) {
        this.commodityId = commodityId;
        this.commodityName = commodityName;
        this.commodityImages = commodityImages;
        this.commodityState = commodityState;
        this.commodityPrice = commodityPrice;
    }
    public Commodity(Integer commodityId, String commodityName, String commodityImages, Integer commodityState, BigDecimal commodityPrice,Integer commodityDiscount) {
        this.commodityId = commodityId;
        this.commodityName = commodityName;
        this.commodityImages = commodityImages;
        this.commodityState = commodityState;
        this.commodityPrice = commodityPrice;
        this.commodityDiscount = commodityDiscount;
    }

    public Commodity(Integer commodityId, String commodityName, String commodityImages, Integer commodityState, BigDecimal commodityPrice, BigDecimal subtotal) {
        this.commodityId = commodityId;
        this.commodityName = commodityName;
        this.commodityImages = commodityImages;
        this.commodityState = commodityState;
        this.commodityPrice = commodityPrice;
        this.subtotal = subtotal;
    }

    public Commodity(String commodityName, int commodityId) {
        this.commodityName = commodityName;
        this.commodityId = commodityId;
    }

    public Commodity(Integer commodityId, String commodityName, String commodityImages) {
        this.commodityId = commodityId;
        this.commodityName = commodityName;
        this.commodityImages = commodityImages;
    }
}
